package com.springboot.module.user.dal.mysql.user;

import com.springboot.module.user.controller.user.vo.UserReqVo;

import com.springboot.module.user.dal.dataobject.user.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;
import java.util.Set;

@Mapper
public interface UserMapper {

    List<SysUser> getAll();

    SysUser userLogin(@Param("username") String username, @Param("password")  String password);

    SysUser selectById(@Param("id") Long id);

    List<SysUser> pageResult(@Param("start") Integer start, @Param("pageNumber") Integer pageNumber);

    List<SysUser> likeSelect(@Param("SysUser") UserReqVo userReqVo);


    void saveUser(@Param("SysUser") SysUser user);


    void deleteById(@Param("id") Long id);


    Set<Long> checkExist(Set<Long> ids);

    void deleteBatch(Set<Long> ids);

    SysUser selectByUsername(@Param("username") String username);

    SysUser selectByMobile(@Param("phone") String phone);

    void updateById(@Param("SysUser") SysUser updateObj);
}
